<template>
  <div class="search-nav-bar">
    <van-config-provider :theme-vars="themeVars">
    <van-nav-bar
      title="搜索"
      left-text=""
      
      left-arrow
      @click-left="onClickLeft"
      

    >
      <template #right>
    <van-icon name="wap-home-o" size="18" @click="onClickRight"/>
  </template>
    </van-nav-bar>
    </van-config-provider>
  </div>
</template>

<script setup>
import {useRouter} from 'vue-router'

const router=useRouter()
const onClickLeft = () => router.go(-1);
const onClickRight = () => {
    // console.log('点击')
    router.push('/home')
};
const themeVars={
    navBarBackgroundColor:"#ffc400"
}

</script>

<style lang="less" scoped>
@import "@/assets/styles/less";
/* 添加这段样式后，Primary Button 会变成红色 */
// v-deep :root:root{
//  --van-background-2: @theme-color !important;
//      --van-nav-bar-background-color: @theme-color !important;
// }

</style>